package com.meichis.yndms.model;


import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

import com.meichis.mcsappframework.adapter.expandablelistview.base.GroupExpandable;
import com.meichis.mcsappframework.entity.Attachment;

import java.io.Serializable;
import java.util.ArrayList;

@Entity
public class Product implements Serializable, GroupExpandable {
    //产品ID
    @PrimaryKey
    private int ID = 0;
    //产品全称
    private String FullName = "";
    //产品简称
    private String ShortName = "";

    private String PinYinName = "";
    //产品编码(平台级编码)
    private String Code = "";
    //零售商品条形码
    private String BarCode = "";
    //整件商品条形码
    private String BoxBarCode = "";
    //品牌名称
    private int Brand = 0;

    private String BrandName = "";
    //系列名称
    private String ClassifyName = "";
    //商品种类
    private int Category = 0;

    private String CategoryName = "";

    private String CategorySortCode = "";
    //段位
    private int Grade = 0;
    //段位名称
    private String GradeName = "";
    //整件包装名称

    private String TrafficPackagingName = "";
    //零售包装名称
    private String PackagingName = "";
    //包装系数
    private int ConvertFactor = 1;
    //TDP自编码
    private String TDPCode = "";
    //默认采购价
    private float BuyPrice = 0;
    //默认销售价
    private float SalesPrice = 0;
    //生产厂商
    private String FactoryName = "";
    //厂家商品码
    private String FactoryCode = "";
    //规格
    private String Spec = "";
    //备注
    private String Remark = "";
    //首要图片
    private String ImageGUID = "";

    private ArrayList<Attachment> Atts = new ArrayList<>();

    public String getSpec() {
        return Spec;
    }

    public void setSpec(String spec) {
        Spec = spec;
    }

    public transient double MinPrice = 0;

    public transient double MaxPrice = 0;
    //保质期(天)
    private int Expiry = 0;

    private ArrayList<FreshScope> FreshScopes = new ArrayList<>();
    //商品所有权 （1平台 2厂家 3经销商）
    private int OwnerType = 3;
    //是否电子化产品(Y/N)
    private String ElectricFlag = "N";
    //是否追溯产品(Y/N)
    private String TraceFlag = "N";

    @Ignore
    private int MinInventoryQty = 0;

    @Ignore
    private int Quantity = 0;

    @Override
    public String getGroupName() {
        return CategoryName;
    }

    //是否必售
    @Ignore
    public transient boolean isMustSale = false;
    //是否铺货
    @Ignore
    public transient boolean isRetailer = false;

    public int getID() {
        return ID;
    }

    public void setID(int ID) {
        this.ID = ID;
    }

    public String getFullName() {
        return FullName;
    }

    public void setFullName(String fullName) {
        FullName = fullName;
    }

    public String getShortName() {
        return ShortName;
    }

    public void setShortName(String shortName) {
        ShortName = shortName;
    }

    public String getPinYinName() {
        return PinYinName;
    }

    public void setPinYinName(String pinYinName) {
        PinYinName = pinYinName;
    }

    public String getCode() {
        return Code;
    }

    public void setCode(String code) {
        Code = code;
    }

    public String getBarCode() {
        return BarCode;
    }

    public void setBarCode(String barCode) {
        BarCode = barCode;
    }

    public String getBoxBarCode() {
        return BoxBarCode;
    }

    public void setBoxBarCode(String boxBarCode) {
        BoxBarCode = boxBarCode;
    }

    public int getBrand() {
        return Brand;
    }

    public void setBrand(int brand) {
        Brand = brand;
    }

    public String getBrandName() {
        return BrandName;
    }

    public void setBrandName(String brandName) {
        BrandName = brandName;
    }

    public String getClassifyName() {
        return ClassifyName;
    }

    public void setClassifyName(String classifyName) {
        ClassifyName = classifyName;
    }

    public int getCategory() {
        return Category;
    }

    public void setCategory(int category) {
        Category = category;
    }

    public String getCategoryName() {
        return CategoryName;
    }

    public void setCategoryName(String categoryName) {
        CategoryName = categoryName;
    }

    public String getCategorySortCode() {
        return CategorySortCode;
    }

    public void setCategorySortCode(String categorySortCode) {
        CategorySortCode = categorySortCode;
    }

    public int getGrade() {
        return Grade;
    }

    public void setGrade(int grade) {
        Grade = grade;
    }

    public String getGradeName() {
        return GradeName;
    }

    public void setGradeName(String gradeName) {
        GradeName = gradeName;
    }

    public String getTrafficPackagingName() {
        return TrafficPackagingName;
    }

    public void setTrafficPackagingName(String trafficPackagingName) {
        TrafficPackagingName = trafficPackagingName;
    }

    public String getPackagingName() {
        return PackagingName;
    }

    public void setPackagingName(String packagingName) {
        PackagingName = packagingName;
    }

    public int getConvertFactor() {
        return ConvertFactor;
    }

    public void setConvertFactor(int convertFactor) {
        ConvertFactor = convertFactor;
    }

    public String getTDPCode() {
        return TDPCode;
    }

    public void setTDPCode(String TDPCode) {
        this.TDPCode = TDPCode;
    }

    public float getBuyPrice() {
        return BuyPrice;
    }

    public void setBuyPrice(float buyPrice) {
        BuyPrice = buyPrice;
    }

    public float getSalesPrice() {
        return SalesPrice;
    }

    public void setSalesPrice(float salesPrice) {
        SalesPrice = salesPrice;
    }

    public String getFactoryName() {
        return FactoryName;
    }

    public void setFactoryName(String factoryName) {
        FactoryName = factoryName;
    }

    public String getFactoryCode() {
        return FactoryCode;
    }

    public void setFactoryCode(String factoryCode) {
        FactoryCode = factoryCode;
    }

    public String getRemark() {
        return Remark;
    }

    public void setRemark(String remark) {
        Remark = remark;
    }

    public String getImageGUID() {
        return ImageGUID;
    }

    public void setImageGUID(String imageGUID) {
        ImageGUID = imageGUID;
    }

    public ArrayList<Attachment> getAtts() {
        return Atts;
    }

    public void setAtts(ArrayList<Attachment> atts) {
        Atts = atts;
    }

    public double getMinPrice() {
        return MinPrice;
    }

    public void setMinPrice(double minPrice) {
        MinPrice = minPrice;
    }

    public double getMaxPrice() {
        return MaxPrice;
    }

    public void setMaxPrice(double maxPrice) {
        MaxPrice = maxPrice;
    }

    public int getExpiry() {
        return Expiry;
    }

    public void setExpiry(int expiry) {
        Expiry = expiry;
    }

    public ArrayList<FreshScope> getFreshScopes() {
        return FreshScopes;
    }

    public void setFreshScopes(ArrayList<FreshScope> freshScopes) {
        FreshScopes = freshScopes;
    }

    public int getOwnerType() {
        return OwnerType;
    }

    public void setOwnerType(int ownerType) {
        OwnerType = ownerType;
    }

    public String getElectricFlag() {
        return ElectricFlag;
    }

    public void setElectricFlag(String electricFlag) {
        ElectricFlag = electricFlag;
    }

    public String getTraceFlag() {
        return TraceFlag;
    }

    public void setTraceFlag(String traceFlag) {
        TraceFlag = traceFlag;
    }

    public boolean isMustSale() {
        return isMustSale;
    }

    public void setMustSale(boolean mustSale) {
        isMustSale = mustSale;
    }

    public boolean isRetailer() {
        return isRetailer;
    }

    public void setRetailer(boolean retailer) {
        isRetailer = retailer;
    }

    public int getMinInventoryQty() {
        return MinInventoryQty;
    }

    public void setMinInventoryQty(int minInventoryQty) {
        MinInventoryQty = minInventoryQty;
    }

    public int getQuantity() {
        return Quantity;
    }

    public void setQuantity(int quantity) {
        Quantity = quantity;
    }
}
